import {combineReducers} from 'redux';
import {cr} from 'share/utils';
import {
  SET_FINANCE_AUDIT,
  SET_FINANCE_PAYMENT,
  SET_FINANCE_BATCH,
  SET_FINANCE_VIEW,
  SET_FINANCE_AUDIT_PARAMS,
  SET_OVERALL_SUB_LIST,
  SET_LOAN_AND_REFUND,
  SET_APPROVE_EXPENSE_REPORT,
  SET_APPROVE_REQUEST,
  SET_APPROVE,
  SET_APPROVE_LOAN,
  SET_APPROVE_LOAN_SELECTED,
  SET_APPROVE_OTHER,
  SET_APPROVE_OTHER_SELECTED,
  SET_APPROVE_REQUEST_SELECTED,
  SET_REQUEST,
  setMyAvailReqForms,
  SET_REQUEST_CLOSE,
  SET_EXPENSE_REPORT,
  SET_EXPENSE_REQUEST_SELECTED,
  SET_TAX_CODE_URL_RULE_ID,
  SET_ALL_CURRENCY,
  SET_BILL_LIST,
  SET_PAY_SETTING,
  SET_DEFAULT_SET_OF_BOOK,
  SET_LOAN_SEARCH,
  SET_EXTRA_SEARCH,
  SET_ORDER_MANAGEMENT,
  SET_SETOFBOOKS,
  SET_PAT_WORKBENCH,
  SET_BUDGET_BALANCE,
  SET_BUDGET_BALANCE_QUERY,
  SET_WORKFLOW_DEPARTMENT_POSITION,
  SET_WORKFLOW_APPROVER_TYPE,
  SET_WORKFLOW_ROLE_LIST,
  SET_MY_AVAIL_REQ_FORMS,
  SET_OVERALL_RESTAURANT_LIST
} from "actions/cache";

export default combineReducers({
  financeAudit: cr({}, {
    [SET_FINANCE_AUDIT](state, {financeAudit}) {
      return financeAudit
    }
  }),
  financeAuditParams: cr({}, {
    [SET_FINANCE_AUDIT_PARAMS](state, {financeAuditParams}) {
      return financeAuditParams
    }
  }),
  financePayment: cr({}, {
    [SET_FINANCE_PAYMENT](state, {financePayment}) {
      return financePayment
    }
  }),
  financeBatch: cr({}, {
    [SET_FINANCE_BATCH](state, {financeBatch}) {
      return financeBatch
    }
  }),
  financeView: cr({}, {
    [SET_FINANCE_VIEW](state, {financeView}) {
      return financeView
    }
  }),
  overallSubList: cr({}, {
    [SET_OVERALL_SUB_LIST](state, {overallSubList}) {
      return overallSubList
    }
  }),
  overallRestaurantList: cr({}, {
    [SET_OVERALL_RESTAURANT_LIST](state, {overallRestaurantList}) {
      return overallRestaurantList
    }
  }),
  loanAndRefund: cr({}, {
    [SET_LOAN_AND_REFUND](state, {loanAndRefund}) {
      return loanAndRefund
    }
  }),
  approveExpenseReport: cr({}, {
    [SET_APPROVE_EXPENSE_REPORT](state, {approveExpenseReport}) {
      return approveExpenseReport
    }
  }),
  approveRequest: cr({}, {
    [SET_APPROVE_REQUEST](state, {approveRequest}) {
      return approveRequest
    }
  }),
  approve: cr({}, {
    [SET_APPROVE](state, {approve}) {
      return approve
    }
  }),
  approveLoan: cr({}, {
    [SET_APPROVE_LOAN](state, {approveLoan}) {
      return approveLoan
    }
  }),
  approveLoanSelected: cr({}, {
    [SET_APPROVE_LOAN_SELECTED](state, {approveLoanSelected}) {
      return approveLoanSelected
    }
  }),
  approveOther: cr({}, {
    [SET_APPROVE_OTHER](state, {approveOther}) {
      return approveOther
    }
  }),
  approveOtherSelected: cr({}, {
    [SET_APPROVE_OTHER_SELECTED](state, {approveOtherSelected}) {
      return approveOtherSelected
    }
  }),
  approveRequestSelected: cr({}, {
    [SET_APPROVE_REQUEST_SELECTED](state, {approveRequestSelected}) {
      return approveRequestSelected
    }
  }),
  expenseRequestSelected: cr({}, {
    [SET_EXPENSE_REQUEST_SELECTED](state, {expenseRequestSelected}) {
      return expenseRequestSelected
    }
  }),
  request: cr({}, {
    [SET_REQUEST](state, {request}) {
      return request
    }
  }),
  myAvailReqForms: cr({}, {
    [SET_MY_AVAIL_REQ_FORMS](state, {myAvailReqForms}) {
      return myAvailReqForms
    }
  }),
  requestClose: cr({}, {
    [SET_REQUEST_CLOSE](state, {requestClose}) {
      return requestClose
    }
  }),
  expenseReport: cr({}, {
    [SET_EXPENSE_REPORT](state, {expenseReport}) {
      return expenseReport
    }
  }),
  allCurrency: cr({},{
    [SET_ALL_CURRENCY](state,{allCurrency}){
      return allCurrency
    }
  }),
  orderManagement: cr({}, {
    [SET_ORDER_MANAGEMENT](state, {orderManagement}) {
      return orderManagement
    }
  }),
  billList: cr({},{
    [SET_BILL_LIST](state,{billList}){
      return billList
    }
  }),

  defaultSetOfBook: cr({}, {
    [SET_DEFAULT_SET_OF_BOOK](state, {defaultSetOfBook}) {
      return defaultSetOfBook
    }
  }),

  loanSearch: cr({},{
    [SET_LOAN_SEARCH](state,{loanSearch}){
      return loanSearch
    }
  }),

  paySetting: cr({},{
    [SET_PAY_SETTING](state,{paySetting}){
      return paySetting
    }
  }),

  extraSearch: cr({},{
    [SET_EXTRA_SEARCH](state,{extraSearch}){
      return extraSearch
    }
  }),

  setOfBooks: cr({},{
    [SET_SETOFBOOKS](state,{setOfBooks}){
      return setOfBooks
    }
  }),

  payWorkbench: cr({},{
    [SET_PAT_WORKBENCH](state,{payWorkbench}){
      return payWorkbench
    }
  }),

  budgetBalance: cr({}, {
    [SET_BUDGET_BALANCE](state, {budgetBalance}) {
      return budgetBalance
    }
  }),

  budgetBalanceQuery: cr({}, {
    [SET_BUDGET_BALANCE_QUERY](state, {budgetBalanceQuery}) {
      return budgetBalanceQuery
    }
  }),

  workflowApproverType: cr({}, {
    [SET_WORKFLOW_APPROVER_TYPE](state, { workflowApproverType }) {
      return workflowApproverType
    }
  }),

  workflowRoleList: cr({}, {
    [SET_WORKFLOW_ROLE_LIST](state, { workflowRoleList }) {
      return workflowRoleList
    }
  }),

  workflowDepartmentPosition: cr({}, {
    [SET_WORKFLOW_DEPARTMENT_POSITION](state, { workflowDepartmentPosition }) {
      return workflowDepartmentPosition
    }
  }),
})
